package com.javabasic.simpleFactory;

/**
 * @author: 晓帆
 * @description:
 * @create: 2021-06-24 21:40
 **/
public class Factory {
    public Animal create(String name){
        if ("pig".equals(name)){
            return new Pig() ;
        }
        return null;
    }
}
